package com.yht.redbook.count.biz.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @author: yht
 * @date: 2025/2/23 21:42
 * @description:
 **/
@Getter
@AllArgsConstructor
public enum CollectUnCollectTypeEnum {

    COLLECT(1),
    UNCOLLECT(0),
    ;

    private final Integer code;

    public static CollectUnCollectTypeEnum valueOf(Integer code) {
        for (CollectUnCollectTypeEnum collectUnCollectTypeEnum : CollectUnCollectTypeEnum.values()) {
            if (Objects.equals(code, collectUnCollectTypeEnum.getCode())) {
                return collectUnCollectTypeEnum;
            }
        }
        return null;
    }
}
